﻿<Window x:Class="MoneyManagerNET.Presentation.View.EditAccountView"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="EditAccountView" Height="300" Width="300" mc:Ignorable="d" 
        
        
        
        Loaded="Window_Loaded"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
            
       xmlns:vm="clr-namespace:MoneyManagerNET.Presentation.ViewModel;assembly=MoneyManagerNET.Presentation.ViewModel" 
       d:DataContext="{x:Static Member=vm:DesignTimeViewModelSupplier.EditAccount}">
    <Grid>
        <Grid  Name="grid1">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="*" />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
            <Label Content="Number:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
            <TextBox Grid.Column="1" IsEnabled="False" Grid.Row="0"  Margin="3" Name="idTextBox" Text="{Binding Path=Id,Mode=OneTime}" />
            <Label Content="Name:" Grid.Column="0" Grid.Row="1" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
            <TextBox Grid.Column="1" Grid.Row="1" Margin="3" Text="{Binding Path=Name}"  />
            <Label Content="Balance:" Grid.Column="0" Grid.Row="2" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
            <TextBox Grid.Column="1" Grid.Row="2" Margin="3" Name="balanceTextBox" Text="{Binding Path=Balance, Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" />
            <Label Content="Status:" Grid.Column="0" Grid.Row="3" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
            <ComboBox  Grid.Column="1" Grid.Row="3" Height="16" HorizontalAlignment="Left" Margin="3" Name="statusCheckBox" VerticalAlignment="Center" ItemsSource="{Binding Path=PossibleStatuses}" SelectedValue="{Binding Status,Mode=OneWayToSource}">
               
                
            </ComboBox>
            <Label Content="Currency Id:" Grid.Column="0" Grid.Row="4" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
            <Button Content="{Binding CurrencyName}" Grid.Column="1" Grid.Row="4" Height="23" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" Width="120" />
            <Label Content="Notes:" Grid.Column="0" Grid.Row="5" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
            <TextBox Grid.Column="1" Grid.Row="5"   Margin="3" Name="notesTextBox" Text="{Binding Model,Path=Notes, Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}"  />
            
            <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Grid.ColumnSpan="2" Grid.Row="6">
                <Button Margin="10,2" Click="Click_Ok">Ok</Button>
                <Button Margin="10,2" Click="Click_Cancel" IsCancel="True">Cancel</Button>
            </StackPanel>
            
        </Grid>
    </Grid>
</Window>
